package com.platform.gateway.controller;

import com.platform.api.Response;
import com.platform.exception.SysError;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import reactor.core.publisher.Mono;

/**
 * fallback
 *
 * @author baohuajie (baohuajie134@163.com)
 * @create 2021 01 01 14:11
 * @since 1.0.0
 */
@Slf4j
@RestController
public class FallbackController {
    @RequestMapping("/cim/fallback")
    public Mono<String> fallback() {
        log.info("============/cim/fallback:当前线程:{}============", Thread.currentThread().getName());
        Response failure = Response.failure(SysError.UNKNOWN);
        return Mono.just(failure.toString());
    }
}
